home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / bounce_c.swf / scripts / frame_1 / DoAction.as
Text File  |  2010-11-09  |  3KB  |  101 lines

  1. function my_menu()
  2. {
  3.    _root.gotoAndStop("menuScreen");
  4. }
  5. function myHigh()
  6. {
  7.    game_quality = "HIGH";
  8. }
  9. function myMed()
  10. {
  11.    game_quality = "MEDIUM";
  12. }
  13. function myLow()
  14. {
  15.    game_quality = "LOW";
  16. }
  17. function myKill()
  18. {
  19.    sound_on = false;
  20.    bgSound.stop();
  21. }
  22. function myStart()
  23. {
  24.    sound_on = true;
  25.    bgSound = new Sound(this);
  26.    bgSound.attachSound("track_" + _root.currentLevel);
  27.    bgSound.start(0,99);
  28. }
  29. function mySite()
  30. {
  31.    getUrl("http://www.chromeshark.com", "");
  32. }
  33. function mySponsor()
  34. {
  35.    getUrl("http://www.maxgames.com", "");
  36. }
  37. function removeAllClips()
  38. {
  39.    _quality = "HIGH";
  40.    bgSound.stop();
  41.    removeMovieClip(drawLine);
  42.    removeMovieClip(starSpin1);
  43.    removeMovieClip(starSpin2);
  44.    removeMovieClip(barLeft);
  45.    removeMovieClip(barRight);
  46.    removeMovieClip(barTop);
  47.    removeMovieClip(barBase);
  48.    removeMovieClip(background1);
  49.    removeMovieClip(background2);
  50.    removeMovieClip(background3);
  51.    removeMovieClip(ballBounce);
  52.    removeMovieClip(topMask);
  53.    removeMovieClip(mapHolder);
  54.    removeMovieClip(powerUp);
  55.    var _loc1_ = 1;
  56.    while(_loc1_ <= 20)
  57.    {
  58.       removeMovieClip("bit" + _loc1_);
  59.       _loc1_ = _loc1_ + 1;
  60.    }
  61. }
  62. stop();
  63. local_data = SharedObject.getLocal("user_data");
  64. var i = 1;
  65. while(i <= 5)
  66. {
  67.    _root["stage_score" + i] = _root.local_data.data["stage_score" + i];
  68.    if(_root["stage_score" + i] == undefined)
  69.    {
  70.       _root["stage_score" + i] = 0;
  71.    }
  72.    i++;
  73. }
  74. var myContextMenu = new ContextMenu();
  75. myContextMenu.hideBuiltInItems();
  76. var my_menu = new ContextMenuItem("Go To Menu",my_menu);
  77. myContextMenu.customItems.push(my_menu);
  78. var myHigh = new ContextMenuItem("Quality: High",myHigh);
  79. myContextMenu.customItems.push(myHigh);
  80. var myMed = new ContextMenuItem("Quality: Medium",myMed);
  81. myContextMenu.customItems.push(myMed);
  82. var myLow = new ContextMenuItem("Quality: Low",myLow);
  83. myContextMenu.customItems.push(myLow);
  84. var myKill = new ContextMenuItem("Kill Music",myKill);
  85. myContextMenu.customItems.push(myKill);
  86. var myStart = new ContextMenuItem("Start Music",myStart);
  87. myContextMenu.customItems.push(myStart);
  88. var mySite = new ContextMenuItem("Chrome Shark Media",mySite);
  89. myContextMenu.customItems.push(mySite);
  90. var mySponsor = new ContextMenuItem("Max Games",mySponsor);
  91. myContextMenu.customItems.push(mySponsor);
  92. _root.menu = myContextMenu;
  93. score_level1 = 4000;
  94. score_level2 = 3750;
  95. score_level3 = 3500;
  96. score_level4 = 3250;
  97. score_level5 = 3000;
  98. score_level6 = 2500;
  99. sound_on = true;
  100. game_quality = "MEDIUM";
  101.